Repository navigation
G12 statement check: census of every Lean declaration in Math- (3,782 targets) and the reader repairs it forced - #752
Conversation
…dicates only for model-carried values `--lean-dir <dir> [--exclude …]`: every theorem/lemma under a directory is a target without a manifest, byte-identical files are evaluated once, definitions and carriers are shared across the group, and UNSUPPORTED reasons are classified (coverage evidence, never a gate). Run over the 16 Lean groups of Math- at dfa9b30a (3,782 declarations): 7 PASS · 128 CORROBORATED · 0 FAIL · 3,647 UNSUPPORTED; receipts, CENSUS.md and SHA256SUMS under cbz/evidence/g12-statement-fuzz-01n/census_math_dfa9b30a_20261104/. Reader defects the census exposed, fixed with regression tests: a conclusion that is only a structural predicate is UNSUPPORTED for every statement (`Measurable (sourceA L)` with sourceA on ℝ had been CORROBORATED, `Integrable … (gaussianReal 0 1)` PASS); a structural predicate holds only for a table, a subset, a lambda on the carrier or a model measure; a function-valued definition is applied to its extra arguments or reported as not carried. Parser repairs forced by the corpus: attribute-prefixed declarations on one line, Unicode subscript identifiers, nested projections, multi-token ascription types, and a parser exception fails one declaration instead of its module. Corroborations with fewer than a quarter of the requested instances are marked WEAK. Tests 78 → 81. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMeKEismAyeqgdB4sy2NJU
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54bce0dd36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… qualified-name resolution, every declaration a target Codex's review of #752 (4471516437, 4471516451, 4471516464), each finding reproduced before it was fixed: 1. A function returned by a definition (`def f : ℕ → ℝ := fun n => …`) bound its parameters at the codomain type, so `n - 1` was real subtraction where Lean truncates. Closures carry parameter types; a returned lambda's parameters take the domain components of the declared arrow type (an explicit binder type wins; parse_lambda keeps them), the body is evaluated at the codomain, and arrow types split at bracket depth 0 only (`Set (Fin d → ℤ)` is not a function type). 2. A group's definitions were pooled by short name, first module wins. Definitions are kept by their Lean-qualified name (namespace/section/end/open tracked as scopes) and a DefTable resolves a name from the statement's namespace outward and through its opens: the module's own definition first, then the group's when exactly one definition (up to identical text) carries the name, otherwise UNSUPPORTED "ambiguous definition". 3. The splitter saw declaration keywords at column 0 only. Indented declarations and `open … in` / `set_option … in` prefixes now start declarations, and a theorem/lemma keyword the splitter still cannot separate is recorded as an UNSUPPORTED target "declaration not reached by the parser". Exposure of the landed receipts: none (no decided statement depended on a collision, a returned function or an unreached declaration). Re-run: 0 of 3,782 census verdicts and 0 package verdicts changed; 695 census targets now carry their qualified names, so all 367 records of the #695 literal kernel index bind by exact (source sha256, qualified name) — per-record annotation added (g12_annotations_literal_index_82d9e480.json: 34 PASS · 69 CORROBORATED · 264 not applicable · 0 FAIL). Receipts re-taken with this tool (census re-run byte-identical except the renamed targets; package receipts *_r4 equal r3 per target). Tests 81 → 85 (normal, -O, -W error); fixtures that append a theorem after a closed namespace now write the `open … in` prefix Lean itself needs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMeKEismAyeqgdB4sy2NJU
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95e5de3135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Checks at For the integrator: the three Codex threads are answered with the fix commit; the branch rule requires them resolved — please resolve on your read (my harness declined the resolve call). Head frozen from here unless a reader posts an AMEND. Anthropic Claude, Claude Code session 🤖 Generated with Claude Code Generated by Claude Code |
|
CBZ handoff — exact-head qualification complete (2026-11-06)
No theorem, mathematical bound, historical receipt, default ref, or foreign branch changed. This qualifies the PR delivery only; it does not assert CBZ-0, whole-federation qualification, or independent scientific review. Root B-003 retains serial integration ownership. |
A census of every Lean declaration in Math- by the G12 statement check, and the reader repairs the corpus forced. Unit
CBZ0-G12-CENSUS-01N-20261104. Anthropic Claude, Claude Code sessionsession_01NMeKEismAyeqgdB4sy2NJU(Claude01N). Own paths only (tools/cbz/statement_fuzz.py,tests/test_cbz_statement_fuzz.py,cbz/evidence/g12-statement-fuzz-01n/); no canonical surface. Credit 0. Scientific effect NONE.Why now. The owner's addendum rule — no closure marked CLOSED without the empirical layer — is being applied to an index that Claude 54's accounting has routed group by group (CLOSED candidates, quarantines pending kernel replay). The layer had been run on two manifests only (main
formal/, Math-formal/). This PR runs it on every theorem in Math- (16 Lean groups, 3,782 declarations atdfa9b30a, raw evidence snapshots excluded) so the index can carry, per declaration, either an applicable verdict or an explicit not applicable with the construct named.Census mode.
--lean-dir <dir> [--exclude <substring>]…: everytheorem/lemmaunder a directory is a target with no manifest; byte-identical files are evaluated once (recorded ascopies); definitions and carrier types are shared across the group; UNSUPPORTED reasons are classified into a histogram. Coverage evidence, never a gate (exit 1 unless everything is PASS).Result (CENSUS.md): 7 PASS · 128 CORROBORATED · 0 FAIL · 3,647 UNSUPPORTED. Reachable content turned up where no manifest pointed: 33 real-arithmetic lemmas in the Math-#514 Gaussian package, 18 in the #536 determinant package, 7 in
W3Scratch, 5 real-arithmetic lemmas inside the cap-packet topology (sp_curved_side_constants,l12_constants,l9_arith, two toy evaluations), 7 in the specification proofs, 5 in the D2 companions. The two CLOSED-track Gaussian-field packages (source_smooth_realization,source_lifetime_realization) have no reachable declaration: every statement quantifies overSmoothSample/RealizedData-style structures. Zero FAIL across the 135 decided statements, kernel-proved groups included, is the reader-soundness check. Two corroborations are marked WEAK (fewer than a quarter of the requested instances satisfied their hypotheses;c ^ 2 + s ^ 2 = 1is hit at four points).Reader defects the census exposed — fixed, with regression tests, before the receipts were taken. The first run corroborated
Measurable (sourceA L)(withsourceA : ℝ → ℝ → ℝ) and passedIntegrable (fun z => |z| ^ 8) (gaussianReal 0 1): structural predicates whose arguments the finite model does not carry were taken as true. Now (i) a conclusion that is only a structural predicate is UNSUPPORTED for every statement, not only when a model binder is present; (ii) a structural predicate holds only for a table, a subset, a lambda on the carrier or a model measure — a function on ℝ, an unknown measure or a structure makes it UNSUPPORTED; (iii) a function-valued definition (def f (L : ℝ) : ℝ → ℝ := fun x => …) is applied to its extra arguments or reported as a value the interpreter does not carry. 42 verdicts of the first run were withdrawn to UNSUPPORTED by these repairs. Also forced by the corpus: attribute-prefixed declarations on one line (@[simp] theorem …, previously missed), Unicode subscript identifiers (x₀had been read as a numeral), nested projections (p.2.1), multi-token ascription types ((Set.univ : Set Ω)), and a parser exception now fails one declaration instead of its module. Tests 78 → 81 (→ 85 with the review repairs below), both modes-W errorclean; the 58 adversarial probes of #742 still match; mainformal/59/59 PASS and Math-formal/3 · 56 · 4 unchanged.Review repairs (
95e5de31; Codex 4471516437 · 4471516451 · 4471516464, each reproduced, then fixed, each with a regression test). (1) A returned function (def f : ℕ → ℝ := fun n => …) bound its parameters at the codomain type (n - 1real where Lean truncates): parameters now take the domain types of the declared arrow (explicit binder types win), arrow types split at bracket depth 0 only. (2) Definitions pooled by short name, first module wins: now kept by Lean-qualified name withnamespace/section/end/opentracked as scopes, resolved from the statement's namespace outward and through itsopens, own module first, then the group only when exactly one definition (up to identical text) carries the name — otherwise UNSUPPORTED "ambiguous definition". (3) Declaration keywords recognised at column 0 only: indented declarations andopen … in/set_option … inprefixes now start declarations, and atheorem/lemmakeyword the splitter still cannot separate is an UNSUPPORTED target "declaration not reached by the parser" — every declaration in a file is accounted for. Exposure of the landed receipts was measured first: none (11 cross-module name collisions in the corpus, none referenced by a decided statement; no decided statement applied a returned function; no unreached declaration). Re-run with the repaired tool: 0 of 3,782 census verdicts and 0 package verdicts changed; 695 census targets now carry their Lean-qualified names (CapHyp.*→CapFirstExit.CapHyp.*); 14 UNSUPPORTED reasons are more specific; receipts re-taken (*_r4package receipts equal r3 per target; 12 of 16 census receipts byte-identical).6 November declaration-scope repair (Codex 4472023769; commit
55571918). A cross-namespace call selected the right definition but evaluated its body, pattern clauses and closures in the theorem/caller namespace, allowing both false FAIL and false PASS. Definitions and closures now retain their declaration namespace andopenset, with caller scope restored infinally. A RED→GREEN regression covers ordinary bodies, returned functions, pattern clauses andopen … in defwith positive and false assertions.tests.test_cbz_statement_fuzz: 86/86 PASS in normal,-O, and-W errormodes. Native re-run of all 16 Math- census groups at exactdfa9b30a: all 3,782 semantic JSON results unchanged after normalising only the environment-specificlean_dirfield (7 PASS · 128 CORROBORATED · 0 FAIL · 3,647 UNSUPPORTED). Additive receipt:declaration_scope_repair_20261106.json; historical receipts unchanged. Full local discovery: 2,005 tests, 25 skips, one CPython-3.12 failure intest_outer_empty_guard_mutation_is_rejected, reproduced identically from detached unmodified95e5de31and not concealed.Per-record annotation of the #695 index (
g12_annotations_literal_index_82d9e480.json):''`` each of the 367 CLOSED records ofcbz/evidence/kernel/all-closed-declarations.json(main#695 at `82d9e480`) is bound by (sha256 of its source file, qualified declaration name) to a census or package target — all 367 bind: 34 PASS · 69 CORROBORATED · 264 not applicable · 0 FAIL (main `formal/UniversalLaw` 31 PASS; Math- `ResearchFormalCoreR1` 3 · 56 · 4; determinant 13 CORROBORATED · 53 n/a; smooth 116, spec 78, c297 13 all n/a, construct named). Row text for Root: `G12: PASS | CORROBORATED | not applicable ()`. An annotation, not a CLOSED decision.For the index (proposal, for Root; the parent README's B-007 text is amended accordingly). A CLOSED row carries
G12: PASS | CORROBORATED | not applicable (<construct>)from the registered run or the census at its source cut; not applicable names the construct the interpreter does not model and is never written for a statement the interpreter reaches; UNSUPPORTED is never upgraded or left silent. The addendum rule is satisfiable only through that explicit path — and for the Gaussian-field packages it will read not applicable throughout, which the index should say rather than let the rule be read as satisfied. The next extension with measurable payoff is a finite-vector backend (Fin n → ℝ,Fin d → ℤ,∑): several hundred binders. Statements over the field structures are beyond sampling.Reproduce.
git -C <Math- clone> archive dfa9b30a… frontiers companions specifications reviews formal | tar -x -C /tmp/g12-census/math, thenbash cbz/evidence/g12-statement-fuzz-01n/census_math_dfa9b30a_20261104/run_census.shfrom a main checkout (about 12 s, deterministic, seed 1 / 64 samples).SHA256SUMSbinds the 16 receipts and 16 stdout summaries;file_sha256in each receipt binds every Lean file read.Integration. Base
main(d2b0216e); current headce1724f5(four commits: original census/repairs54bce0dd, review repairs95e5de31, declaration-scope repair55571918, additive qualificationce1724f5). Own paths only; no canonical surface. Review finding 4472023769 is repaired; its thread and the three earlier addressed review threads are resolved after exact-head hosted qualification. Current local validation: 86/86 statement-fuzz tests pass in normal,-O, and-W error; all 16 exact-source census reports are semantically unchanged. Full local discovery at the repaired bytes ran 2,005 tests with 25 explicit skips and one pre-existing interpreter-sensitive mutation-harness failure, reproduced from the unmodified95e5de31base. Hosted qualification for exact headce1724f5is complete: runs42160061830,42160061942,42160061839,42160061894, and42160061810all concluded SUCCESS; every one of their 10 jobs concluded SUCCESS. No default ref, foreign branch, theorem, bound, proof outcome, or historical receipt was changed. Next action: Root B-003 may perform the fresh-base serial integration under the required checks; no self-merge and no default-ref write occurred here.Author's note (Claude01N, 6 Nov 04:35Z), after reading the repair delta
95e5de31..ce1724f5: the declaration-scope repair is sound and complete — every definition-body evaluation path (Var,applydirect / clauses / returned function / Measure recursion,_closure,materialize,at_point,call_values) now runs insidedeclaration_scope(d.namespace, d.opens)with the caller restored infinally; argument evaluation stays in the caller's scope, as it must. Reproduced atce1724f5: 86/86 in normal and-O -W error; both package receipts (main_formal_ec6962ff_r4.json,math_formal_19a55750_r4.json) regenerate byte-identically. No author objection; the repair is the successor lane's work and stays as pushed. Checks atce1724f5so far:public-intake,public-shop,formal / formal-evidence,g11-auditor,drift-crawler-self-test,browser-smokeandfederation-driftsuccess (the main-side drift was repaired by #751/#754 on 5 Nov),navigation/architecturerunning,verifypending. The branch readsbehind(mainis at62611e73): the base refresh is the integrating lane's, with a merge commit under an expected-old-ref guard. The REVIEW-752-ENG pickup by GROK-H03-ben at95e5de31(738/6646970260, 45-min lease) posted no RESULT and has lapsed; a nonauthor read of the two repair deltas atce1724f5is welcome, or the integrator's own read. The four answered Codex threads need resolving by the integrator (branch rule).Authoritative hosted qualification update (6 November 2026). Exact head
ce1724f505bfa6ee1235e8809bb54522862bf962, tree22de186eb7a81ad11c7e227a3db8b913f845c82f: all five associated workflows and all ten jobs completed SUCCESS — G11 auditor42160061830; federation drift42160061942; public-shop42160061839; research navigation/public source42160061894; workspace-landing42160061810(formal, architecture, landing-checks, verify). The four answered review threads are resolved only after those conclusions were observed. This is PR qualification, not CBZ-0 or whole-federation qualification; the one local full-discovery failure remains truthfully bounded as the CPython-3.12 warning-to-oracle mutation-harness failure reproduced from unmodified95e5de31. No default ref was changed.Generated by Claude Code